package com.dd.cloud.user.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单流水表
 * </p>
 *
 * @author czg
 * @since 2020-03-21
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "订单流水表")
public class OrderFlow implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 流水号 订单流水表
     */
    @TableId(type = IdType.INPUT)
    @Column(isKey = true, comment = "流水号")
    private String flowNo;

    /**
     * 订单号
     */
    @Column(length = 64, comment = "订单号")
    private String orderNo;

    /**
     * 订单号
     */
    @Column(length = 64, comment = "openid")
    private String openid;

    /**
     * 流水金额
     */
    @Column(comment = "流水金额(分)")
    private Integer totalFee;

    /**
     * 流水类型 1支付 2退款
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "流水类型 1支付 2退款")
    private Integer flowType;

    /**
     * 支付状态，1=未支付，2=已支付
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "支付状态 1未支付 2已支付")
    private Integer status;

    /**
     * 创建日期
     */
    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;

    /**
     * 支付日期
     */
    @Column(comment = "支付时间")
    private LocalDateTime payDate;

    /**
     * 支付方式
     */
    @Column(length = 10, comment = "支付方式 wxh5,wxjsapi等等")
    private String payment;

    /**
     * 备注说明
     */
    @Column(length = 100, comment = "备注说明")
    private String remark;
}
